// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Jiang Li
// Date   : 2004-6-6

#include "stdafx.h"
#include "jsocket.h"
#include ".\jsocket.h"
#include <atlutil.h>
#include "thread.h"

// class CJoySocket

//##ModelId=44C4B5F70280
CJoySocket::CJoySocket()
{
    m_state = JSS_None;

}

//##ModelId=44C4B5F70281
CJoySocket::~CJoySocket()
{
}

//##ModelId=44C4B5F70276
void CJoySocket::OnConnect(int nErrorCode)
{
    __super::OnConnect(nErrorCode);

    if(nErrorCode != 0)
    {
        m_state = JSS_None;
    }
    else
    {
        m_state = JSS_Connected;
    }
}

//##ModelId=44C4B5F70279
void CJoySocket::OnClose()
{
    m_state = JSS_None;
    __super::OnClose();
}
